package com.huangliusong.desigin.principle.openclose;

/**
 * @author huangliusong
 * @since 2018/10/8
 * {@link JavaCourse}
 */
public class JavaDiscountCourse extends JavaCourse {
    public JavaDiscountCourse(Integer id, String name, Double price) {
        super(id, name, price);
    }

    public Double getOrginPrice(){
        return super.getPrice();
    }

    @Override
    public Double getPrice() {
        //当前价格判断
        return super.getPrice()*0.8;
    }
}
